$OpenBSD: patch-channels_rdpdr_printer_printer_cups_c,v 1.1 2014/07/10 13:25:46 giovanni Exp $
--- channels/rdpdr/printer/printer_cups.c.orig	Thu Jul 10 11:21:38 2014
+++ channels/rdpdr/printer/printer_cups.c	Thu Jul 10 11:21:14 2014
@@ -125,9 +125,8 @@ static void printer_cups_close_printjob(rdpPrintJob* p
 
 #endif
 
-	xfree(cups_printjob);
-
 	((rdpCupsPrinter*)printjob->printer)->printjob = NULL;
+	xfree(cups_printjob);
 }
 
 static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id)
